//
//  NSDate+toString.m
//  WXMedia
//
//  Created by User on 14-6-11.
//  Copyright (c) 2014年 User. All rights reserved.
//

#import "NSDate+toString.h"

@implementation NSDate (toString)

- (NSString *)dateWithNOTimeString
{
	NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
	[dateFormatter setDateFormat:@"yyyy-MM-dd"];
	NSString *strDate = [dateFormatter stringFromDate:self];
	
	return strDate;
}

- (NSString *)dateWithYESTimeString
{
	NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
	[dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
	NSString *strDate = [dateFormatter stringFromDate:self];
	
	return strDate;
}

@end
